package com.glela.goods.service;

import java.util.Collection;
import java.util.List;
import java.util.Map;

import org.springframework.http.ResponseEntity;

import com.glela.goods.model.StoreGoods;
import com.glela.goods.model.vo.goods.GoodsListResponse;

public interface StoreGoodsService {
	/**
	 * <dl>
	 * <dt>用户上架商品信息</dt>
	 * </dl>
	 * @param userId
	 * @param goodsIds
	 * @return Map<Long,StoreGoods>
	 * @author zls
	 * @date 2017年7月31日 下午6:39:50
	 */
	Map<Long, StoreGoods> queryStoreGoods(Long userId, Collection<Long> goodsIds);

	List<GoodsListResponse> findStoreGoodsListByPage(Integer storeUserId, Integer topBannerId, String from, Integer startIndex, Integer pageSize);

	ResponseEntity<?> addStoreGoods(StoreGoods storeGoods);

	ResponseEntity<?> removeStoreGoods(StoreGoods storeGoods);
	
	int selectCount(StoreGoods querySg);

	void reloadStoreList(String key , Integer storeUserId, Integer topBannerId, String from, int i, int size);
	
	public List<GoodsListResponse> readerRedisStoreGoods(int startRow,int endRow,String key);
	
	/**
	 * 返回商品是否在店主精选里面上架 ， TRUE: 已上架  FALSE: 未上架
	 * 
	 * @author zyf
	 * @param storeUserId
	 * @param goodsId
	 * @return 
	 */
	public  boolean isStoreGoodsUpload(Long storeUserId, Long goodsId);
}
